package com.core.controller;


import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping
@Tag(name = "测试接口")
public class TestController {

    // 需要认证的端点
    @Operation(summary = "用户认证接口测试")
    @GetMapping("/secure")
    public String secureEndpoint() {
        log.info("访问测试接口");
        return "认证通过！";
    }

    // 公开访问的端点
    @Operation(summary = "公开接口测试")
    @GetMapping("/public")
    public String publicEndpoint() {
        log.info("访问测试接口");
        return "公开访问！";
    }
}